package com.joelemon.mockinfluxdbdata.mock.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Description: 插入服务工厂
 * @Author: HJY
 * @Date: 2023/11/20
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class DBInsertServiceFactory {

    public static final String HTTP = "httpInsertOptimize";

    private final Map<String, DBInsertService> dbInsertServiceMap;

    public DBInsertService getService(String name) {
        return dbInsertServiceMap.get(name);
    }

    public DBInsertService getDefaultService() {
        return dbInsertServiceMap.get(HTTP);
    }

}
